<?php
require_once("funcionesBase.php");
	$nombreTabla=getNombreTablas();
	$mensaje='';
	$tam=(count($nombreTabla));
	for($i=0;$i<$tam;$i++)
	{
	  $numatributo=getNumCol($nombreTabla[$i]);
	  $mensaje.='<a href="consulta.php" class="list-group-item">'.$nombreTabla[$i].' <span class="badge">'.$numatributo.'</span> </a>';
	}	
			
echo ' 
<!DOCTYPE html> 
<html>
  <head>
  
    <title>Administrador bases de datos</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="css/bootstrap.css" rel="stylesheet">
	<link href="css/estilos.css" rel="stylesheet">
	

  </head>
  <body>

  
  

<!-- Barra de navegacion superiror -->
 <nav class="navbar navbar-static-top navbar-inverse" role="navigation">  
	  <div class="navbar-header">
		<a class="navbar-brand" href="index.php"> </a>
	   </div>	
	   <div class="col-md-4">
			<ul class="nav navbar-nav">
					<li> <a href="index.php">&nbsp <span class="glyphicon glyphicon-send"></span>&nbsp &nbsp &nbsp Sistema base de datos</a></li>				
			</ul>
		</div>
		<div class="collapse navbar-collapse" id="barraNavegacion" role="banner">
			<ul class="nav navbar-nav">
				<li> <a href="#"><span class="glyphicon glyphicon-home"></span>&nbsp Inicio</a></li>
				<li id="bTablas"> <a href="#"><span class="glyphicon glyphicon-list-alt"></span>&nbsp Tablas</a></li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="navbar-left" data-toggle="modal" data-target="#MacercaDe" ><a href="#"><span class="glyphicon glyphicon-info-sign " ></span>&nbsp Acerca de...</a></li>
			</ul>
	</div>
</nav>
 

	<div class="row">
	
	
	<!-- 
					<div class="modal fade" id="unModelo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog columnasNuevaTabla">
							<div class="modal-content columnasNuevaTabla">
								<div class="modal-header columnasNuevaTabla">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="tituloModal">Columnas nueva tabla</h4>
								</div>
								
								<div class="modal-body columnasNuevaTabla " id="cuerpoModelo">
									
									jjajaj
									
								</div>
								<div class="modal-footer columnasNuevaTabla">
									<button type="button" class="btn btn-primary" data-dismiss="modal">Aceptar</button>
								</div>
							</div>
							
						</div>
					</div> -->

		<div class="col-md-4 principal">
		
		<!-- Barra de navegacion  izquierda -->
		
		<div class="panel panel-primary">
			<div class="panel-heading">
				<span class="glyphicon glyphicon-tower">&nbsp</span>  
				<div class="btn-group panel-title">
				  <button  type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
					BD ndikandi.utm.mx <span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu" role="menu">
		
								
				  </ul>
				</div>
				
			</div>
			
			<div class="panel panel-default">
				<div class="panel-heading">
					<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
					  Tabla 1 <span class="badge">5</span>
					</a>
				 </div>
				<div id="collapseTwo" class="panel-collapse collapse">
					<div class="panel-body">
							
								<div class="list-group listaLinks">
								  <a href="#" class="list-group-item">Atributo1 (Int)</a>			  
								  <a href="#" class="list-group-item">Atributo2 (Varchar)</a>
								  <a href="#" class="list-group-item">Atributo3 (Boolean)</a>
								  <a href="#" class="list-group-item">Atributo4 (Int)</a>
								  <a href="#" class="list-group-item">Atributo5 (Float)</a>
								</div>
							
					</div>
				</div>
			</div> 
			
			<div class="list-group listaLinks">'.$mensaje.'
			
			</div>
			
			         
		</div>
	

	
		</div>
		
		
		<div id="principal" class="col-md-16 principal">
		
			<div class="panel panel-primary">
		

				
				
				<div class="panelPrincipal" id="cuerpoPrincipal">
				
  actualizarTupla("Alumnos","ic20113");				
<!-- Aqui poner todo el contnido de la pantalla principal -->				
				<!-- Aqui poner todo el contnido de la pantalla principal -->				
				<!-- Aqui poner todo el contnido de la pantalla principal -->				
				<!-- Aqui poner todo el contnido de la pantalla principal -->				

				<div class="panel panel-primary">
					
					
					<div class="panel-heading">
						<div class="row">
							<div class="col-md-5">
								<span class="glyphicon glyphicon-list-alt"></span>
									Tablas
							</div>
							<div class="col-md-15 tdDerecha">
								<button type="button" class="btn btn-success tdDerecha btn-sm">
											<span class="glyphicon glyphicon-plus-sign"></span>
											Nueva tabla
										</button>
							</div>
						</div>
						

						
					</div>

					<br>
					<div class="panel panel-info tdCentrado ">
					<div class="panel-heading">
						
						<div class="row">
							<div class="col-md-4">
									Alumnos <span class="badge">43 filas</span>
							</div>
							<div class="col-md-16 tdDerecha">
								<div class="btn-group">
									<button type="button" class="btn btn-info btn-sm">
										<span class="glyphicon glyphicon-eye-open"></span>
										Ver tuplas
									</button>
									<button id="bModificar" type="button" class="btn btn-primary btn-sm">
										<span class="glyphicon glyphicon-edit"></span>
										Modificar estructura
									</button>
									<button type="button" class="btn btn-warning btn-sm">
										<span class="glyphicon glyphicon-fire"></span>
										Vaciar
									</button>
									<button type="button" class="btn btn-danger btn-sm">
										<span class="glyphicon glyphicon-trash"></span>
										Eliminar
									</button>
								</div>
							</div>
						</div>
						
					</div>
					<br>
                    <table class="table table-striped table-hover table-bordered table-condensed">
                        
                        <tr>
							<th>Nombre de columna</th>
							<th>Tipo</th>
							<th>Longitud</th>
							<th>Valores Null</th>
							<th>Clave primaria</th>
							<th>AutoIncrement</th>
                        </tr>
                        <tr>
							<td>Nombre</td>
							<td>VARCHAR</td>
							<td>50</td>
							<td>50</td>
							<td>Si</td>
							<td>No</td>
                        <tr>
                        </tr>
							<td>Edad</td>
							<td>Int</td>
							<td>-</td>
							<td>50</td>
							<td>No</td>
							<td>No</td>
                        </tr>
					</table>	
					</div>	
					
					
                	
					</div>
					
				
				
					
				</div>
			</div>
		</div>
  
	</div>

    <!-- jQuery -->
	<!-- <script src="https://code.jquery.com/jquery.js"></script>
	 -->
	 <script src="js/jquery.js"></script>
	
	<script src="js/bootstrap.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script>	
	$( "#bTablas" ).mousedown(function() {
		$( "#cuerpoPrincipal" ).load("mostrarTablas.php");
		
	});
	
	</script>
	
  </body>
</html>';
?>

